package com.ketangpai.admin.mapper;

import com.ketangpai.admin.entity.WorkComment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface WorkCommentMapper {
    List<WorkComment> selectMainComments(@Param("workId") Integer workId,
                                         @Param("offset") Integer offset,
                                         @Param("pageSize") Integer pageSize);

    int countMainComments(@Param("workId") Integer workId);

    List<WorkComment> selectReplies(@Param("superiorId") Integer superiorId);

    void insert(WorkComment comment);

    void deleteById(Integer id);

    void deleteReplies(Integer superiorId);
}
